package net.zjitc.interfaces.charge2;

/**
 * @Author admin
 * @Date 2019/3/22 11:23
 * 工厂类：创建对象
 */
public class ChargeFactory {
    public static Charge getCharge(int a) {
        Charge charge;
        if(a==1){
            charge=new Bus();
        }else{
            charge=new Taxi();
        }
        return charge;
    }
}
